/*******************************************************************************
Kane, Velez, and Barabas  
Analyze the Attentive & Bypass Bias:  Mock Vignette Checks in Survey Experiments
***************************************************************************** */
*User-written packages to install
net install outreg2, from ("http://fmwww.bc.edu/RePEc/bocode/o")
ssc install blindschemes // additional schemes:  "plottig" and "plotplain"
ssc install g538schemes // especially great scheme:  "538w"

*Begin log file 
log using "PSRM_Replication_Stata_Analyses.smcl", replace // begin log

*Change font in graphs
graph set window fontface "ArialNarrow-Bold" // change font


***************
***************
*NORC Data
***************
***************

use "NORC_replicationdata.dta", clear

reg NORC_DV i.NORC_Treatment // Experiment ITT replication 

*Figure 2 

reg NORC_DV i.NORC_Treatment##c.MVC_scale // Interaction model for CATE estimates
margins, dydx(NORC_Treatment) at(MVC_scale=(0(1)3)) // generate estimates for figure

*Generating Figure 2
*Note:  Minor edits were manually done to the graph
marginsplot, scheme(538bw) legend(ring(0) pos(1))  ///
xlabel(,grid glpattern(solid) glcolor(gs14)) ///
ylabel(,grid glpattern(solid) glcolor(gs14)) ///
xmtick(##2, ticks grid glpattern(solid) glcolor(gs14))  ///
ymtick(##2, ticks grid glpattern(solid) glcolor(gs14)) ///
title("") ytitle("{Effect of Treatment on Support for SL Forgiveness") ///
xtitle("Number of Correct Mock Vignette Checks (MVCs)") ///
plotopts(lcolor(black) lwidth(medium) mcolor(black) msymbol(circle) msize(medlarge)) ///
ciopts(lcolor(black)) recastci(rspike) ///
addplot(hist MVC_scale, discrete title( " ") ///
gap(30) ///
ylabel(-.3(.1).1) ///
ytitle("Conditional Effect of Student Loan Treatment" "on Support for Loan Forgiveness") ///
yaxis(2) yscale(alt axis(2)) percent ///
ytick(-.3(.05).1) ///
ylabel(0 "0%" 5 "5%" 10 "10%" 15 "15%" 20 "20%" 25 "25%" ///
30 "30%" 35 "35%" 40 "40%", labcolor(black*.9) axis(2)) ///
ytitle("Percent of Sample", axis(2) orientation(rvertical))  ///
fcolor(gs12%40) fintensity(100) lcolor(none)) ///
yscale(titlegap(-5) outergap(0)) ///
legend(off) ///
xsize(6.5) ysize(3.8)  graphregion(margin(1 2 2 2)) //

*Export graph
graph export "Fig2a.pdf", as(pdf) replace // create Figure 2a (top panel)

*Performance on the MVC Scale
tab MVC_scale

*Pairwise correlations between MVCs
pwcorr MVC1 MVC2 MVC3, sig

*Cronbach's alpha value for MVC scale items
alpha MVC1 MVC2 MVC3, item


********************
** Table A1 Analyses
********************
ci means MVdisplaytime // average time on screen
proportion MVC1 MVC2 MVC3 // proportion passing each MVC


di .8069705-.2 // difference b/w proportion passing MVC1 vs. chance
prtest MVC1==.2 // significance test for this difference

di .3619303-.2 // difference b/w proportion passing MVC2 vs. chance
prtest MVC2==.2 // significance test for this difference

di .4651475-.2 // difference b/w proportion passing MVC2 vs. chance
prtest MVC3==.2 // significance test for this difference

********************
*Table A7 Analyses
********************
bysort NORC_Treatment:  tab MVC_scale // % passing MVCs by experimental condition
tab MVC_scale // overall % passing n number of MVCs

********************
*Table B1. Demographic Results (restricted to those featured in model)
********************
reg NORC_DV i.NORC_Treatment##c.MVC_scale // model to use for calculating demographics

tabstat HH_Income age educ if e(sample), st(mean p50) // descriptive stats for income, age, educ

tab gender if e(sample) // % female in sample

tab race_5cat if e(sample) // % of each racial group

tab partyid if e(sample) // % of partisans

* Additional information
tab HH_Income if e(sample) // distribution of income
tab HH_Income if e(sample), nol // distribution of income (no labels)

tab educ if e(sample) // distribution of education
tab educ if e(sample), nol // distribution of education (no labels)

********************
*Table D1 Analyses
********************
*Demographic predictors of MVC performance
reg MVC_scale_01 i.gender i.race_5cat age_01 income_01 educ_01 pid7_01 

*Produce Table D1 (NORC column)
outreg2 using TableD1.doc, ctitle(NORC) dec(2) e(r2_a) ///
alpha(0.001, 0.01, 0.05, .10) symbol(***, **, *,^) 

*Correlations between race, age, and MVC performance
tab race_5cat, gen(race_dummy) // generate a race dummy variable
pwcorr MVC_scale age race_dummy1-race_dummy5, sig // correlations between MVC performance & race


*Comparing Models with and without controlled interactions with significant predictors
*Original Model Without Controlled Interactions
reg NORC_DV i.NORC_Treatment##c.MVC_scale  // model without controlled interactions
estimates store mod1 // save estimates

*Model Without Controlled Interactions (Using significant predictors of MVC performance)
reg NORC_DV i.NORC_Treatment##c.MVC_scale  i.NORC_Treatment##i.race_5cat ///
i.NORC_Treatment##c.income_01 i.NORC_Treatment##c.educ_01 // // model without controlled interactions
estimates store mod2 // save estimates

*Create estimates table for comparisons
estimates table mod1 mod2, /// 
b(%10.3f) se(%4.2f) stats(N r2 r2_a rmse) // little change in CATE size (now slightly stronger)



***************************
*Table E1 Analyses (NORC)
***************************

*Better MVC Performance Predicts Greater Time Spent
reg MVdisplaytime_logged MVC_scale_01 // Predicting time spent on Mock Vignette (164% increase)

reg EXPdisplaytime_control_logged MVC_scale_01 // Predicting time spent on control vignette (68% increase)

reg EXPdisplaytime_logged MVC_scale_01 // Predicting time spent on treatment condition (122% increase)

reg EXPOutcomedisplaytime_logged MVC_scale_01 // Predicting time spent on experiment outcome measure (ns)

reg duration_SB_logged MVC_scale_01  // Predicting time spent on survey (88% increase)

*Better MVC Performance Predicts Higher Pr(Answering Experiment FMC Correctly) 
logit FMC_correct MVC_scale_01 // Predicting pr(passing the FMC)
margins, dydx(MVC_scale_01) // effect of MVC performance = .35

********************
*Appendix G
********************
*Proportion of sample randomly assigned to not receive an MV
proportion No_MV_Shown




********************
********************
*MTURK Study 2 Data
********************
********************

use "MTURK2_replicationdata.dta", clear

reg Opposition_01 i.Treatment  // Experiment ITT replication

*FIGURE 2
reg Opposition_01 i.Treatment##c.MVC_scale  // Interaction model for CATE estimates
margins, dydx(Treatment) at(MVC_scale=(0(1)3)) // generate estimates for figure

*Code for Figure 2
marginsplot, scheme(538bw) legend(ring(0) pos(1))  ///
xlabel(,grid glpattern(solid) glcolor(gs14)) ///
ylabel(,grid glpattern(solid) glcolor(gs14)) ///
xmtick(##2, ticks grid glpattern(solid) glcolor(gs14))  ///
ymtick(##2, ticks grid glpattern(solid) glcolor(gs14)) ///
title("") ytitle("{bf: Effect of Treatment on Opposition to Social Welfare}") ///
xtitle("Number of Correct Mock Vignette Checks (MVCs)") ///
plotopts(lcolor(black) lwidth(medium) mcolor(black) msymbol(circle) msize(medlarge)) ///
ciopts(lcolor(black)) recastci(rspike) ///
addplot(hist MVC_scale, discrete ///
gap(30) ///
title( " ") ///
ytitle("Conditional Effect of 'Lazy' Treatment" ///
"on Opposition to Social Welfare", size(small)) ///
legend(off) ///
xtitle("Number of Correct Mock Vignette Checks (MVCs)", size(small)) ///
yaxis(2) yscale(alt axis(2)) percent ///
ylabel(0 "0%" 5 "5%" 10 "10%" 15 "15%" 20 "20%" 25 "25%" 30 "30%" 35 "35%" 40 "40%", labcolor(black*.9) axis(2)) ///
ylab(0(.2).6) ///
ytitle("Percent of Sample", axis(2) orientation(rvertical))  ///
yscale(titlegap(2) outergap(1)) ///
fcolor(gs12%40) fintensity(100) lcolor(none)) ///
xsize(6.5) ysize(3.8) graphregion(margin(vsmall))

graph export "Fig2b.pdf", as(pdf) replace // create Figure 2b (bottom panel)


*Performance on the MVC scale
tab MVC_scale // % passing n number of MVCs

*Pairwise correlations
pwcorr MVC1 MVC2 MVC3, sig // correlations between MVCs

*Cronbach's alpha values
alpha MVC1 MVC2 MVC3, item // alpha statistic for MVC scale

********************
** Table A2 Analyses
********************
ci means q10_pagesubmit // average time on screen
proportion MVC1 MVC2 MVC3 // proportion passing each MVC

di .8034826 -.1667 // difference b/w proportion passing MVC1 vs. chance
prtest MVC1==.1667 // significance test for this difference

di .4415423-.1667 // difference b/w proportion passing MVC2 vs. chance
prtest MVC2==.2 // significance test for this difference

di .7313433-.1667 // difference b/w proportion passing MVC2 vs. chance
prtest MVC3==.1667 // significance test for this difference


********************
*Table A7 Analyses
********************
bysort Treatment:  tab MVC_scale // % passing n number of MVCs by experimental condition
tab MVC_scale // overall % passing n number of MVCs


********************
*Table B1. Demographic Results (restricted to those featured in model)
********************
reg Opposition_01 i.Treatment##c.MVC_scale  // Model for calculating demographic stats

	*// Descriptive stats for income age, education and political interest
tabstat income age polint educ if e(sample), st(mean p50) 

tab gender if e(sample) // % female
tab race_5cat if e(sample) // % of each racial group
tab pid7 if e(sample) // % of each partisan group
tab ideology if e(sample) // % of each ideological group
 

*Additional information
tab income if e(sample) // // frequency distribution for income
tab educ if e(sample) // frequency distribution for education
tab polint if e(sample) // frequency distribution for political interest

********************
*Table D1 Analyses
********************
*Demographic predictors of MVC performance
reg MVC_scale_01 i.gender i.race_5cat age_01 income_01 educ_01 polint_01 pid7_01 ideology_01 

*Generate table D1
outreg2 using TableD1.doc, append ctitle(MTurk 2) dec(2) e(r2_a) ///
alpha(0.001, 0.01, 0.05, .10) symbol(***, **, *,^) 

* Other information Reported in Appendix D 
*Correlations between race, age, and MVC performance
tab race_5cat, gen(race_dummy) // generate racial dummy variables
pwcorr MVC_scale age race_dummy1-race_dummy5, sig // correlations between race and MVC performance

*Comparing Models with and without controlled interactions with significant predictors
*Original Model Without Controlled Interactions
reg Opposition_01 i.Treatment##c.MVC_scale  // model without controlled interactions
estimates store mod1 // store estmates

*Model Without Controlled Interactions (Using significant predictors of MVC performance)
	// model without controlled interactions
reg Opposition_01 i.Treatment##c.MVC_scale  i.Treatment##i.race_5cat i.Treatment##c.age_01
estimates store mod2 // store estimates

*Generate estimates table
estimates table mod1 mod2, /// table showing estimates from above models
b(%10.3f) se(%4.2f) stats(N r2 r2_a rmse) // little change in CATE size


********************
*Table E1 Analyses
********************

*Better MVC Performance Predicts Greater Time Spent
reg q10_pagesubmit_logged MVC_scale_01 // Predicting time on MV (196% increase)
reg q54_pagesubmit_logged MVC_scale_01 // Predicting time on control vignette (unlucky) (141% increase)
reg q12_pagesubmit_logged MVC_scale_01 // Predicting time on treatment vignette (lazy) (204% increase)
reg q11_pagesubmit_logged MVC_scale_01 // Predicting time on experiment outcome (79% increase)
reg duration_logged MVC_scale_01 // Predicting time on survey in total (57% increase)

*Better MVC Performance Predicts Higher Pr(Answering Experiment FMC Correctly) 
logit FMC_correct MVC_scale_01 // Predicting pr(passing the FMC)
margins, dydx(MVC_scale_01) // effect of performance on the MVC scale = .45



**************
**************
*MTURK 1 Study
**************
**************

use "MTURK1_replicationdata.dta", clear

reg SLexpDV i.SL_Treatment // Experiment ITT replication

reg SLexpDV i.SL_Treatment if MVC_Correct==0 // effect among MVC non-passers = -.41 (ns)
reg SLexpDV i.SL_Treatment if MVC_Correct==1 // effect among MVC passers = -.72 (p<.001)

********************
** Table A6 Analyses
********************
ci means MV_time // average time and CI reading the Mock Vignette
proportion MVC_Correct // proportion passing the MVC (71%)

di .7131012-.2 // difference between proportion passing and pr(answering correctly by chance)
prtest MVC_Correct==.2 // significance test for above difference

********************
** Table A7 Analyses
********************

bysort SL_Treatment:  tab MVC_Correct // % passing n MVCs by experimental group

tab MVC_Correct // % passing n MVCs in overall sample

********************
*Table B1. Demographic Results (restricted to those featured in model)
********************
reg SLexpDV i.SL_Treatment##i.MVC_Correct // regression model to calculate demographics
	*Descriptive stats for income, education, age and political interest
tabstat income educ age polint if e(sample), st(mean median)
tab1 gender race_5cat pid7 ideology if e(sample) // % female, racial groups, party and ideology

*Additional information
tab1 educ polint income
tab1 gender race_5cat educ polint pid7 ideology income if e(sample), nol


********************
*Table D1 Analyses
********************

*Demographic predictors of MVC performance
reg MVC_Correct i.gender i.race_5cat age_01 income_01 educ_01 polint_01 pid7_01 ideology_01  
	*Add to Table D1
outreg2 using TableD1.doc, append ctitle(MTurk 1) dec(2) e(r2_a) ///
alpha(0.001, 0.01, 0.05, .10) symbol(***, **, *,^) 

*Other information Reported in Appendix D

*Correlations between race, age, and MVC performance
tab race_5cat if e(sample), gen(race_dummy) // generate racial dummy variable
pwcorr MVC_Correct age race_dummy1-race_dummy5 if e(sample), sig // correlations between race & MVC performance

*Original Model 
reg SLexpDV i.SL_Treatment // Model for replication of main experiment
tab race_5cat if e(sample) //race demographics for sample of MVC passers
sum age if e(sample) // age statistics for sample of MVC passers

*Model Subsetting on Passing the MVC
reg SLexpDV i.SL_Treatment if MVC_Correct==1 
tab race_5cat if e(sample) //race demographics for sample of MVC passers
sum age if e(sample) // age statistics for sample of MVC passers

********************
*Table E1 Analyses
********************

*Better MVC Performance Predicts Greater Time Spent
reg logged_MV_time i.MVC_Correct // Predicting time spent on Mock Vignette (123% increase)

reg logged_Control_time i.MVC_Correct // Predicting time spent on control vignette (63% increase)

reg logged_Treatment_time i.MVC_Correct // Predicting time spent on treatment condition (108% increase)

reg logged_Outcome_time i.MVC_Correct // Predicting time spent on experiment outcome measure (14% increase)

reg logged_Durationinseconds i.MVC_Correct  // Predicting time spent on survey (36% increase)

*Better MVC Performance Predicts Higher Pr(Answering Experiment FMC Correctly) 
logit SL_FMC_Correct MVC_Correct  // Predicting pr(answering FMC correctly)
margins, dydx(MVC_Correct) // effect of MVC performance on FMC passage = .33



****************
****************
*QUALTRICS Study
****************
****************

use "Qualtrics_replicationdata.dta", clear

/*Note:  Qualtrics identifies individuals who completed the survey too quickly and excludes them
from the total N count. These individuals are therefore excluded from the majority of analyses 
below via specifying "if Speeder==0". However,as we report in the manuscript, we find that many 
MVC non-passers were NOT identified by Qualtrics as "speeders": */
tab Speeder MVC_Correct, column chi2 // relationship between "Speeder" status and MVC performance


reg expDV i.kkktreatment if Speeder==0 // Experiment ITT replication 

reg expDV i.kkktreatment if MVC_Correct==0 & Speeder==0 // Effect among MVC non-passers= -.36 (p=.10)
reg expDV i.kkktreatment if MVC_Correct==1 & Speeder==0 // Effect among MVC passers = -.51 (p<.01)


********************
** Table A6 Analyses
********************
ci means MV_Time if Speeder==0 // mean time spent reading MV (with CI)
proportion MVC_Correct if Speeder==0 // proportion passing MVC (64%)
	* Among those not identified as "speeders" by Qualtrics
	proportion MVC_Correct // 55%

di .6377551-.2 // difference between passage rate above and pr(answering MVC correctly by chance)
prtest MVC_Correct==.2 // significance test for above difference

********************
** Table A7 Analyses
********************

bysort kkktreatment:  tab MVC_Correct if Speeder==0 // % passing n MVCs by experimental group

tab MVC_Correct if Speeder==0 // % passing n MVCs in overall sample

********************
*Table B1. Demographic Results (restricted to those featured in model)
********************
reg expDV i.kkktreatment##i.MVC_Correct if Speeder==0 // regression model to calculate demographics

	*Descriptive statistics for income, education, age and political interest
tabstat income educ age polint if e(sample), st(mean median)

tab1 gender race_5cat pid7 ideology if e(sample) // % female, racial groups, party and ideology

*Additional information
tab1 gender race_5cat educ polint pid7 ideology income if e(sample)

********************
*Table D1 Analyses
********************

*Demographic predictors of MVC performance
reg MVC_Correct i.gender i.race_5cat age_01 income_01 educ_01 polint_01 pid7_01 ideology_01 if Speeder==0 

	*Add above results to Table D2
outreg2 using TableD1.doc, append ctitle(Qualtrics) dec(2) e(r2_a) ///
alpha(0.001, 0.01, 0.05, .10) symbol(***, **, *,^) 

*Other information Reported in Appendix D

*Correlations between race, age, and MVC performance
tab race_5cat if e(sample), gen(race_dummy) // generate race dummy variables

	*Correlations between MVC performance, age, and race dummy variables
pwcorr MVC_Correct age race_dummy1-race_dummy5 if e(sample), sig 

*Original Model 
reg expDV i.kkktreatment if Speeder==0 
tab race_5cat if e(sample) // race demographics for sample
sum age if e(sample) // age statistics for sample

*Model Subsetting on Passing the MVC
reg expDV i.kkktreatment if Speeder==0 & MVC_Correct==1 
tab race_5cat if e(sample) //race demographics for sample of MVC passers
sum age if e(sample) // age statistics for sample of MVC passers


********************
*Table E1 Analyses
********************

*Better MVC Performance Predicts Greater Time Spent

**Predicting time spent on Mock Vignette
reg logged_Q10_pageSubmit i.MVC_Correct if Speeder==0 // (83% increase)

**Predicting time Spent on Control Vignette (Free Speech)
reg logged_Q54_PageSubmit i.MVC_Correct if Speeder==0 // (88% increase)

**Predicting time Spent on Treatment Vignette (Public Order)
reg logged_Q12_PageSubmit i.MVC_Correct if Speeder==0 // (81% increase)

**Predicting time spent on outcome measure
reg Q11_logged i.MVC_Correct if Speeder==0 // (12% increase)

**Predicting time spent on entire survey
reg log_Durationinseconds i.MVC_Correct if Speeder==0 // (10% increase)

**Predicting passage of Factual Manipulation Check
logit FMC_Correct i.MVC_Correct if Speeder==0 // 
margins, dydx(MVC_Correct) // effect of MVC performance on pr(answering FMC correctly)=.35

********************
*Appendix G
********************
*Proportion of sample randomly assigned to not receive an MV
proportion No_MV_Shown if Speeder==0



*********************
*********************
*LUCID STUDY 1
*********************
*********************

use "Lucid1_replicationdata.dta", clear

*Replicate each experiment's ITT
reg slexpdv i.SLexpTreatment // Student Loan Experiment/MockVignette_MTurk
reg kkkexpdv i.KKKexpPO // KKK Framing Study
reg apexpdv i.APexpLazy // Welfare Deservingness Study
reg DVsum_immexp01 i.IMMIGexpHSM // Immigration Study


*Grand correlation between first and second round MV performance
pwcorr R1MVperformance R2MVperformance, sig obs // p=.594

*Pairwise correlations within each MVC scale
	*MV #1:  Scientific Publishing
pwcorr mvcheck1a_Correct mvcheck1b_Correct mvcheck1c_Correct, sig
	
	*MV #2:  Stadium Licenses
pwcorr mvcheck2a_Correct mvcheck2b_Correct mvcheck2c_Correct, sig 

	*MV #3:  Sulfur Reductions
pwcorr mvcheck3a_Correct mvcheck3b_Correct mvcheck3c_Correct, sig

	*MV #4:  Plant Removal
pwcorr mvcheck4a_Correct mvcheck4b_Correct mvcheck4c_Correct, sig



*Cronbach's alpha values within each MVC scale
	*MV #1:  Scientific Publishing
alpha mvcheck1a_Correct mvcheck1b_Correct mvcheck1c_Correct, item
	
	*MV #2:  Stadium Licenses
alpha mvcheck2a_Correct mvcheck2b_Correct mvcheck2c_Correct, item 

	*MV #3:  Sulfur Reductions
alpha mvcheck3a_Correct mvcheck3b_Correct mvcheck3c_Correct, item

	*MV #4:  Plant Removal
alpha mvcheck4a_Correct mvcheck4b_Correct mvcheck4c_Correct, item


*APPENDIX A

	*TABLE A2: Scientific Publishing Vignette (Lucid Results)
ci means q10_pagesubmit // mean time spent (and CI) on MV

proportion mvcheck1a_Correct // proportion answering MVC correctly
di .7789347-.16666667 // difference b/w above and answering correctly by chance
prtest mvcheck1a_Correct==.16666667 // significance test

proportion mvcheck1b_Correct // proportion answering MVC correctly
di .4995977-.16666667 // difference b/w above and answering correctly by chance
prtest mvcheck1b_Correct==.16666667 // significance test

proportion mvcheck1c_Correct // proportion answering MVC correctly
di .7068826-.16666667 // difference b/w above and answering correctly by chance
prtest mvcheck1c_Correct==.16666667 // significance test


	**TABLE A3:  Stadium Licenses Vignette (Lucid Results)
ci means q125_pagesubmit // mean time spent (and CI) on MV

proportion mvcheck2a_Correct // proportion answering MVC correctly
di .7404886-.16666667 // difference b/w above and answering correctly by chance
prtest mvcheck2a_Correct==.16666667 // significance test

proportion mvcheck2b_Correct // proportion answering MVC correctly
di .7894525-.16666667 // difference b/w above and answering correctly by chance
prtest mvcheck2b_Correct==.16666667 // significance test

proportion mvcheck2c_Correct // proportion answering MVC correctly
di .6195477-.16666667 // difference b/w above and answering correctly by chance
prtest mvcheck2c_Correct==.16666667 // significance test


	*TABLE A4:  Sulfur Reductions
ci means q133_pagesubmit // mean time spent (and CI) on MV

proportion mvcheck3a_Correct // proportion answering MVC correctly
di .7998392-.16666667 // difference b/w above and answering correctly by chance
prtest mvcheck3a_Correct==.16666667 // significance test

proportion mvcheck3b_Correct // proportion answering MVC correctly
di .6108414-.16666667 // difference b/w above and answering correctly by chance
prtest mvcheck3b_Correct==.16666667 // significance test

proportion mvcheck3c_Correct // proportion answering MVC correctly
di .6670722-.16666667 // difference b/w above and answering correctly by chance
prtest mvcheck3c_Correct==.16666667 // significance test


	*TABLE A5:  Plant Removal
ci means q152_pagesubmit // mean time spent (and CI) on MV

proportion mvcheck4a_Correct // proportion answering MVC correctly
di .8113057-.16666667 // difference b/w above and answering correctly by chance
prtest mvcheck4a_Correct==.16666667 // significance test

proportion mvcheck4b_Correct // proportion answering MVC correctly
di .5750901-.16666667 // difference b/w above and answering correctly by chance
prtest mvcheck4b_Correct==.16666667 // significance test

proportion mvcheck4c_Correct // proportion answering MVC correctly
di .5591657-.16666667 // difference b/w above and answering correctly by chance
prtest mvcheck4c_Correct==.16666667 // significance test


********************
** Table A7 Analyses
********************

tab MVCscale_Round2 if Treatment_Round2==0 // % answering n MVCs correctly in control groups
tab MVCscale_Round2 if Treatment_Round2==1 // % answering n MVCs correctly in treatment groups
tab MVCscale_Round2 // % answering n MVCs correctly in overall sample


********************
*Table B1. Demographic Results (restricted to those featured in model)
********************
proportion mvround1 //  restrict demographics to those who were assigned in Round 1

*Descriptive statistics for income, education, age, and political interest
tabstat income educ age polint if e(sample), st(mean median)

* % female, racial groups, party and ideology
tab1 gender race_5cat pid7 ideology  if e(sample)

*Additional information
tab1 gender race_5cat educ polint pid7 ideology income if e(sample), nol


********************
*Table E2 Analyses
********************

*Better MVC Performance Predicts Greater Time Spent

**
*Experiment 1 (Student Loan Forgiveness)

*Mock Vignette Length (200% increase)
reg lnRound2MVtime R2MVperformance_01 i.mvround2 if expround2==1, robust // reported n size

*Experiment Vignette Length
		*Control (101% increase)
reg ln_q144_pagesubmit R2MVperformance_01 i.mvround2 if expround2==1, robust 

		*Treatment (158% increase)
reg ln_q146_pagesubmit R2MVperformance_01 i.mvround2 if expround2==1, robust

*Time answering outcome measure (32% increase)
reg ln_q148_pagesubmit R2MVperformance_01 i.mvround2 if expround2==1, robust

*Survey duration (63% increase)
reg ln_durationinseconds R2MVperformance_01 i.mvround2 if expround2==1, robust 

*Answering FMC correctly
logit SLexpFMC_Correct R2MVperformance_01 i.mvround2 if expround2==1
margins, dydx(R2MVperformance_01) // effect = .40


*******************************
	*Experiment 2 (KKK) 
*******************************

*Mock Vignette length (172% increase)
reg lnRound2MVtime R2MVperformance_01 i.mvround2 if expround2==2, robust // reported n size

*Experiment vignette length
		*Public order (control) (170% increase)
reg ln_q184_pagesubmit R2MVperformance_01 i.mvround2 if expround2==2, robust	

	*Free speech (treatment) (162% increase)
reg ln_q182_pagesubmit R2MVperformance_01 i.mvround2 if expround2==2, robust

*Time answering outcome measure (34% increase)
reg ln_q186_pagesubmit R2MVperformance_01 i.mvround2 if expround2==2, robust // significant

*Survey duration (64% increase)
reg ln_durationinseconds R2MVperformance_01 i.mvround2 if expround2==2, robust 

*Answering FMC correctly
logit KKKexpFMC_Correct R2MVperformance_01 i.mvround2 if expround2==2
margins, dydx(R2MVperformance_01) // effect=.50


*******************************
	*Experiment 3 (Deservingness) 
*******************************

*Mock Vignette length (203% increase)
reg lnRound2MVtime R2MVperformance_01 i.mvround2 if expround2==3, robust // reported n size

*Experiment vignette length
		*unlucky (control) (157% increase)
reg ln_q54_pagesubmit R2MVperformance_01 i.mvround2 if expround2==3, robust	
	
		*lazy (treatment) (155% increase)
reg ln_q12_pagesubmit R2MVperformance_01 i.mvround2 if expround2==3, robust

*Time answering outcome measure (67% increase)
reg ln_q11_pagesubmit R2MVperformance_01 i.mvround2 if expround2==3, robust

*Survey duration (65% increase)
reg ln_durationinseconds R2MVperformance_01 i.mvround2 if expround2==3, robust

*Answering FMC correctly
logit APfmc_Correct R2MVperformance_01 i.mvround2 if expround2==3
margins, dydx(R2MVperformance_01) // effect = .43


*******************************
	*Experiment 4 (Immigration) 
*******************************

*Mock Vignette length (205% increase)
reg lnRound2MVtime R2MVperformance_01 i.mvround2 if expround2==4, robust // reported n size

*Experiment vignette length
		*Control (Low status middle-eastern) (168% increase)
reg ln_q160_pagesubmit R2MVperformance_01 i.mvround2 if expround2==4, robust

		*Treatment (high stuatus mexican) (164% increase)
reg ln_q162_pagesubmit R2MVperformance_01 i.mvround2 if expround2==4, robust

*Time answering outcome measures (combined all three) (63% increase)
reg ln_exp4_totaltime R2MVperformance_01 i.mvround2 if expround2==4, robust
	
*Survey duration (70% increase)
reg ln_durationinseconds R2MVperformance_01 i.mvround2 if expround2==4, robust 

*Answering FMC correctly
logit IMMIGexpFMC_Correct R2MVperformance_01 i.mvround2 if expround2==4
margins, dydx(R2MVperformance_01) // effect = .48


**************
*Appendix G
**************

*Note: continue to use "Lucid1_replicationdata.dta"
tab mvround1 // % randomly assigned to not receive an MV

use "Lucid1_AppendixG_SDtests_replicationdata.dta"

*Testing for significant variances in outcome by whether an MV is shown
by EXP treatment, sort: sdtest outcome, by(MV_binary) // no signficant differences

**************
*Appendix D
**************

*Demographic predictors of MVC performance
use "Lucid1_TableD1_replicationdata.dta", clear

*Note: These data are in long-form (up to 2 observations per respondent)

*Table D1
reg MVCscale01 female i.race_5cat age_01 income_01 educ_01 polint_01 pid7_01 ideology_01 ///
i.ROUND i.Experiment, vce(cluster responseid_num) // model

	*Add Above Model to Table D2
outreg2 using TableD1.doc, append ctitle(Lucid) dec(2) e(r2_a) ///
alpha(0.001, 0.01, 0.05, .10) symbol(***, **, *,^) 

*********************
*********************
*LUCID STUDY 2
*********************
*********************

use "Lucid2_Appendix_B_and_G_replicationdata.dta", clear

********************
*Table B1. Demographic Results 
********************

tab gender // n size reported

*Descriptive statistics for income, education, age and political interest
tabstat income educ age polint, st(mean p50)

tab gender // % female
tab ethnicity_clean // % in each racial group
tab Hispanic_clean // % identifying as Hispanic
tab pid7 // % in each partisan category
tab ideology // % in each ideological category


*Additional information
codebook income 
codebook educ 
codebook polint 

*Appendix G
	* % of sample randomly assigned to not receive an MV
tab checkround // checkround=0 indicates respondents had no MV in first round


******************************************
******************************************

log close // close log
